Swapped code using new and old UI system around.

This commit is contained in:
Daan Vanden Bosch 2019-08-21 17:56:46 +02:00
parent 060e746aac
commit 72506461ab
165 changed files with 347 additions and 1488 deletions

View File

@ -3,8 +3,8 @@ import { writeFileSync } from "fs";
import "isomorphic-fetch";
import Logger from "js-logger";
import { ASSETS_DIR } from ".";
import { Difficulty, SectionId, SectionIds } from "../src/core/domain";
import { BoxDropDto, EnemyDropDto, ItemTypeDto } from "../src/core/dto";
import { Difficulty, SectionId, SectionIds } from "../src/old/core/domain";
import { BoxDropDto, EnemyDropDto, ItemTypeDto } from "../src/old/core/dto";
import {
name_and_episode_to_npc_type,
NpcType,

View File

@ -5,8 +5,8 @@ import { BufferCursor } from "../src/core/data_formats/cursor/BufferCursor";
import { ItemPmt, parse_item_pmt } from "../src/core/data_formats/parsing/itempmt";
import { parse_quest } from "../src/core/data_formats/parsing/quest";
import { parse_unitxt, Unitxt } from "../src/core/data_formats/parsing/unitxt";
import { Difficulties, Difficulty, SectionId, SectionIds } from "../src/core/domain";
import { BoxDropDto, EnemyDropDto, ItemTypeDto, QuestDto } from "../src/core/dto";
import { Difficulties, Difficulty, SectionId, SectionIds } from "../src/old/core/domain";
import { BoxDropDto, EnemyDropDto, ItemTypeDto, QuestDto } from "../src/old/core/dto";
import { update_drops_from_website } from "./update_drops_ephinea";
import { Episode, EPISODES } from "../src/core/data_formats/parsing/quest/Episode";
import { npc_data, NPC_TYPES, NpcType } from "../src/core/data_formats/parsing/quest/npc_types";

View File

@ -1,39 +0,0 @@
import { autorun, observable } from "mobx";
import { Server } from "../../core/domain";
class ApplicationStore {
@observable current_server: Server = Server.Ephinea;
@observable current_tool: string = this.init_tool();
private global_keyup_handlers = new Map<string, () => void>();
constructor() {
autorun(() => {
window.location.hash = `#/${this.current_tool}`;
});
}
on_global_keyup(tool: string, binding: string, handler: () => void): void {
this.global_keyup_handlers.set(`${tool} -> ${binding}`, handler);
}
dispatch_global_keyup = (e: KeyboardEvent) => {
const binding_parts: string[] = [];
if (e.ctrlKey) binding_parts.push("Ctrl");
if (e.shiftKey) binding_parts.push("Shift");
if (e.altKey) binding_parts.push("Alt");
binding_parts.push(e.key.toUpperCase());
const binding = binding_parts.join("-");
const handler = this.global_keyup_handlers.get(`${this.current_tool} -> ${binding}`);
if (handler) handler();
};
private init_tool(): string {
const tool = window.location.hash.slice(2);
return tool.length ? tool : "viewer";
}
}
export const application_store = new ApplicationStore();

View File

@ -1,48 +0,0 @@
.main {
display: flex;
flex-direction: column;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.navbar {
display: flex;
border-bottom: solid 1px var(--border-color-split);
}
.heading_menu {
flex: 1;
margin-bottom: -1px !important;
}
.server_select {
display: flex;
align-items: center;
margin: 0 6px;
}
.server_select > span {
display: inline-block;
margin-right: 10px;
}
.beta {
color: #f55656;
font-weight: bold;
}
.content {
flex: 1;
display: flex;
flex-direction: column;
align-items: stretch;
overflow: hidden;
}
.content > * {
flex: 1;
overflow: hidden;
}

View File

@ -1,86 +0,0 @@
import { Menu, Select } from "antd";
import { ClickParam } from "antd/lib/menu";
import { observer } from "mobx-react";
import React, { ReactNode, Component } from "react";
import { Server } from "../../core/domain";
import styles from "./ApplicationComponent.css";
import { DpsCalcComponent } from "../../dps_calc/ui/DpsCalcComponent";
import { with_error_boundary } from "../../core/ui/ErrorBoundary";
import { HuntOptimizerComponent } from "../../hunt_optimizer/ui/HuntOptimizerComponent";
import { QuestEditorComponent } from "../../quest_editor/ui/QuestEditorComponent";
import { ViewerComponent } from "../../viewer/ui/ViewerComponent";
import { application_store } from "../stores/ApplicationStore";
const Viewer = with_error_boundary(ViewerComponent);
const QuestEditor = with_error_boundary(QuestEditorComponent);
const HuntOptimizer = with_error_boundary(HuntOptimizerComponent);
const DpsCalc = with_error_boundary(DpsCalcComponent);
@observer
export class ApplicationComponent extends Component {
componentDidMount(): void {
window.addEventListener("keyup", this.keyup);
}
componentWillUnmount(): void {
window.removeEventListener("keyup", this.keyup);
}
render(): ReactNode {
let tool_component;
switch (application_store.current_tool) {
case "viewer":
tool_component = <Viewer />;
break;
case "quest_editor":
tool_component = <QuestEditor />;
break;
case "hunt_optimizer":
tool_component = <HuntOptimizer />;
break;
case "dps_calc":
tool_component = <DpsCalc />;
break;
}
return (
<div className={styles.main}>
<div className={styles.navbar}>
<Menu
className={styles.heading_menu}
onClick={this.menu_clicked}
selectedKeys={[application_store.current_tool]}
mode="horizontal"
>
<Menu.Item key="viewer">
Viewer<sup className={styles.beta}>(Beta)</sup>
</Menu.Item>
<Menu.Item key="quest_editor">
Quest Editor<sup className={styles.beta}>(Beta)</sup>
</Menu.Item>
<Menu.Item key="hunt_optimizer">Hunt Optimizer</Menu.Item>
{/* <Menu.Item key="dpsCalc">
DPS Calculator
</Menu.Item> */}
</Menu>
<div className={styles.server_select}>
<span>Server:</span>
<Select defaultValue={Server.Ephinea} style={{ width: 120 }}>
<Select.Option value={Server.Ephinea}>{Server.Ephinea}</Select.Option>
</Select>
</div>
</div>
<div className={styles.content}>{tool_component}</div>
</div>
);
}
private menu_clicked = (e: ClickParam) => {
application_store.current_tool = e.key;
};
private keyup = (e: KeyboardEvent) => {
application_store.dispatch_global_keyup(e);
};
}

View File

@ -1,8 +1,8 @@
import Logger from "js-logger";
import { Endianness } from "../../Endianness";
import { ControlFlowGraph } from "../../../../quest_editor/scripting/data_flow_analysis/ControlFlowGraph";
import { register_value } from "../../../../quest_editor/scripting/data_flow_analysis/register_value";
import { stack_value } from "../../../../quest_editor/scripting/data_flow_analysis/stack_value";
import { ControlFlowGraph } from "../../../../old/quest_editor/scripting/data_flow_analysis/ControlFlowGraph";
import { register_value } from "../../../../old/quest_editor/scripting/data_flow_analysis/register_value";
import { stack_value } from "../../../../old/quest_editor/scripting/data_flow_analysis/stack_value";
import {
Arg,
DataSegment,
@ -11,13 +11,13 @@ import {
Segment,
SegmentType,
StringSegment,
} from "../../../../quest_editor/scripting/instructions";
} from "../../../../old/quest_editor/scripting/instructions";
import {
Kind,
Opcode,
OPCODES,
StackInteraction,
} from "../../../../quest_editor/scripting/opcodes";
} from "../../../../old/quest_editor/scripting/opcodes";
import { ArrayBufferCursor } from "../../cursor/ArrayBufferCursor";
import { Cursor } from "../../cursor/Cursor";
import { ResizableBufferCursor } from "../../cursor/ResizableBufferCursor";

View File

@ -4,8 +4,8 @@ import {
InstructionSegment,
Segment,
SegmentType,
} from "../../../../quest_editor/scripting/instructions";
import { Opcode } from "../../../../quest_editor/scripting/opcodes";
} from "../../../../old/quest_editor/scripting/instructions";
import { Opcode } from "../../../../old/quest_editor/scripting/opcodes";
import { prs_compress } from "../../compression/prs/compress";
import { prs_decompress } from "../../compression/prs/decompress";
import { ArrayBufferCursor } from "../../cursor/ArrayBufferCursor";

View File

@ -4,7 +4,7 @@ import { create_el } from "./dom";
import { WritableProperty } from "../observable/WritableProperty";
import { property } from "../observable";
import { LabelledControl } from "./LabelledControl";
import { is_property, Property } from "../observable/Property";
import { is_any_property, Property } from "../observable/Property";
export class NumberInput extends LabelledControl {
readonly element: HTMLInputElement = create_el("input", "core_NumberInput core_Input");
@ -40,7 +40,7 @@ export class NumberInput extends LabelledControl {
}
private set_prop<T>(prop: "min" | "max" | "step", value: T | Property<T>): void {
if (is_property(value)) {
if (is_any_property(value)) {
this.element[prop] = String(value.get());
this.disposable(value.observe(v => (this.element[prop] = String(v))));
} else {

View File

@ -1,6 +1,6 @@
import { ResizableView } from "./ResizableView";
import { create_el } from "./dom";
import { Renderer } from "../../../core/rendering/Renderer";
import { Renderer } from "../rendering/Renderer";
export class RendererView extends ResizableView {
readonly element = create_el("div");
@ -11,9 +11,14 @@ export class RendererView extends ResizableView {
this.element.append(renderer.dom_element);
this.disposable(renderer);
}
// TODO: stop on hidden
renderer.start_rendering();
start_rendering(): void {
this.renderer.start_rendering();
}
stop_rendering(): void {
this.renderer.stop_rendering();
}
resize(width: number, height: number): this {

View File

@ -10,6 +10,10 @@ export interface Property<T> extends Observable<T, PropertyMeta<T>> {
export type PropertyMeta<T> = { old_value: T };
export function is_property<T>(observable: any): observable is Property<T> {
export function is_property<T>(observable: Observable<T, any>): observable is Property<T> {
return (observable as any).is_property;
}
export function is_any_property(observable: any): observable is Property<any> {
return (observable as any).is_property;
}

View File

@ -79,6 +79,7 @@ export abstract class Renderer {
}
start_rendering(): void {
this.schedule_render();
requestAnimationFrame(this.call_render);
}

View File

@ -2,8 +2,30 @@ import { ApplicationView } from "./application/gui/ApplicationView";
import { Disposable } from "./core/observable/Disposable";
import "./index.css";
import { throttle } from "lodash";
import Logger from "js-logger";
export function initialize(): Disposable {
Logger.useDefaults({
defaultLevel: (Logger as any)[process.env["LOG_LEVEL"] || "OFF"],
});
// Disable native undo/redo.
document.addEventListener("keydown", e => {
const kbe = e as KeyboardEvent;
if (kbe.ctrlKey && !kbe.altKey && kbe.key.toUpperCase() === "Z") {
kbe.preventDefault();
}
});
// This doesn't work in FireFox:
document.addEventListener("beforeinput", e => {
const ie = e as any;
if (ie.inputType === "historyUndo" || ie.inputType === "historyRedo") {
e.preventDefault();
}
});
function initialize(): Disposable {
const application_view = new ApplicationView();
const resize = throttle(
@ -25,3 +47,5 @@ export function initialize(): Disposable {
},
};
}
initialize();

View File

@ -1,41 +0,0 @@
import React from "react";
import ReactDOM from "react-dom";
import Logger from "js-logger";
import styles from "./core/ui/index.css";
import { ApplicationComponent } from "./application/ui/ApplicationComponent";
// import "react-virtualized/styles.css";
// import "react-select/dist/react-select.css";
// import "react-virtualized-select/styles.css";
import "golden-layout/src/css/goldenlayout-base.css";
import "golden-layout/src/css/goldenlayout-dark-theme.css";
// import "antd/dist/antd.less";
import { initialize } from "./new";
Logger.useDefaults({
defaultLevel: (Logger as any)[process.env["LOG_LEVEL"] || "OFF"],
});
// Disable native undo/redo.
document.addEventListener("keydown", e => {
const kbe = e as KeyboardEvent;
if (kbe.ctrlKey && !kbe.altKey && kbe.key.toUpperCase() === "Z") {
kbe.preventDefault();
}
});
// This doesn't work in FireFox:
document.addEventListener("beforeinput", e => {
const ie = e as any;
if (ie.inputType === "historyUndo" || ie.inputType === "historyRedo") {
e.preventDefault();
}
});
// const root_element = document.createElement("div");
// root_element.id = styles.phantasmal_world_root;
// document.body.append(root_element);
//
// ReactDOM.render(<ApplicationComponent />, root_element);
initialize();

View File

@ -1,216 +0,0 @@
import {
AnimationAction,
AnimationClip,
AnimationMixer,
Clock,
DoubleSide,
Mesh,
MeshLambertMaterial,
Object3D,
PerspectiveCamera,
SkeletonHelper,
SkinnedMesh,
Texture,
Vector3,
} from "three";
import { Renderer } from "../../../core/rendering/Renderer";
import { model_store } from "../stores/ModelStore";
import { Disposable } from "../../core/observable/Disposable";
import { create_mesh, create_skinned_mesh } from "../../../core/rendering/conversion/create_mesh";
import { ninja_object_to_buffer_geometry } from "../../../core/rendering/conversion/ninja_geometry";
import { NjObject } from "../../../core/data_formats/parsing/ninja";
import {
create_animation_clip,
PSO_FRAME_RATE,
} from "../../../core/rendering/conversion/ninja_animation";
import { NjMotion } from "../../../core/data_formats/parsing/ninja/motion";
import { xvm_to_textures } from "../../../core/rendering/conversion/ninja_textures";
export class ModelRenderer extends Renderer implements Disposable {
private readonly perspective_camera: PerspectiveCamera;
private readonly disposables: Disposable[] = [];
private readonly clock = new Clock();
private mesh?: Object3D;
private skeleton_helper?: SkeletonHelper;
private animation?: {
mixer: AnimationMixer;
clip: AnimationClip;
action: AnimationAction;
};
constructor() {
super(new PerspectiveCamera(75, 1, 1, 200));
this.perspective_camera = this.camera as PerspectiveCamera;
this.disposables.push(
model_store.current_nj_data.observe(this.nj_data_or_xvm_changed),
model_store.current_xvm.observe(this.nj_data_or_xvm_changed),
model_store.current_nj_motion.observe(this.nj_motion_changed),
model_store.show_skeleton.observe(this.show_skeleton_changed),
model_store.animation_playing.observe(this.animation_playing_changed),
model_store.animation_frame_rate.observe(this.animation_frame_rate_changed),
model_store.animation_frame.observe(this.animation_frame_changed),
);
}
set_size(width: number, height: number): void {
this.perspective_camera.aspect = width / height;
this.perspective_camera.updateProjectionMatrix();
super.set_size(width, height);
}
dispose(): void {
super.dispose();
this.disposables.forEach(d => d.dispose());
}
protected render(): void {
if (this.animation) {
this.animation.mixer.update(this.clock.getDelta());
}
this.light_holder.quaternion.copy(this.perspective_camera.quaternion);
super.render();
if (this.animation && !this.animation.action.paused) {
this.update_animation_frame();
this.schedule_render();
}
}
private nj_data_or_xvm_changed = () => {
if (this.mesh) {
this.scene.remove(this.mesh);
this.mesh = undefined;
this.scene.remove(this.skeleton_helper!);
this.skeleton_helper = undefined;
}
if (this.animation) {
this.animation.mixer.stopAllAction();
if (this.mesh) this.animation.mixer.uncacheRoot(this.mesh);
this.animation = undefined;
}
const nj_data = model_store.current_nj_data.get();
if (nj_data) {
const { nj_object, has_skeleton } = nj_data;
let mesh: Mesh;
const xvm = model_store.current_xvm.get();
const textures = xvm ? xvm_to_textures(xvm) : undefined;
const materials =
textures &&
textures.map(
tex =>
new MeshLambertMaterial({
skinning: has_skeleton,
map: tex,
side: DoubleSide,
alphaTest: 0.5,
}),
);
if (has_skeleton) {
mesh = create_skinned_mesh(ninja_object_to_buffer_geometry(nj_object), materials);
} else {
mesh = create_mesh(ninja_object_to_buffer_geometry(nj_object), materials);
}
// Make sure we rotate around the center of the model instead of its origin.
const bb = mesh.geometry.boundingBox;
const height = bb.max.y - bb.min.y;
mesh.translateY(-height / 2 - bb.min.y);
this.mesh = mesh;
this.scene.add(mesh);
this.skeleton_helper = new SkeletonHelper(mesh);
this.skeleton_helper.visible = model_store.show_skeleton.get();
(this.skeleton_helper.material as any).linewidth = 3;
this.scene.add(this.skeleton_helper);
this.reset_camera(new Vector3(0, 10, 20), new Vector3(0, 0, 0));
}
this.schedule_render();
};
private nj_motion_changed = (nj_motion?: NjMotion) => {
let mixer!: AnimationMixer;
if (this.animation) {
this.animation.mixer.stopAllAction();
mixer = this.animation.mixer;
}
const nj_data = model_store.current_nj_data.get();
if (!this.mesh || !(this.mesh instanceof SkinnedMesh) || !nj_motion || !nj_data) return;
if (!this.animation) {
mixer = new AnimationMixer(this.mesh);
}
const clip = create_animation_clip(nj_data.nj_object, nj_motion);
this.animation = {
mixer,
clip,
action: mixer.clipAction(clip),
};
this.clock.start();
this.animation.action.play();
this.schedule_render();
};
private show_skeleton_changed = (show_skeleton: boolean) => {
if (this.skeleton_helper) {
this.skeleton_helper.visible = show_skeleton;
this.schedule_render();
}
};
private animation_playing_changed = (playing: boolean) => {
if (this.animation) {
this.animation.action.paused = !playing;
if (playing) {
this.clock.start();
this.schedule_render();
} else {
this.clock.stop();
}
}
};
private animation_frame_rate_changed = (frame_rate: number) => {
if (this.animation) {
this.animation.mixer.timeScale = frame_rate / PSO_FRAME_RATE;
}
};
private animation_frame_changed = (frame: number) => {
const nj_motion = model_store.current_nj_motion.get();
if (this.animation && nj_motion) {
const frame_count = nj_motion.frame_count;
if (frame > frame_count) frame = 1;
if (frame < 1) frame = frame_count;
this.animation.action.time = (frame - 1) / PSO_FRAME_RATE;
this.schedule_render();
}
};
private update_animation_frame(): void {
if (this.animation && !this.animation.action.paused) {
const time = this.animation.action.time;
model_store.animation_frame.set(time * PSO_FRAME_RATE + 1);
}
}
}

View File

@ -1,4 +1,4 @@
import { enum_values } from "../enums";
import { enum_values } from "../../../core/enums";
export const RARE_ENEMY_PROB = 1 / 512;
export const KONDRIEU_PROB = 1 / 10;

View File

@ -1,7 +1,6 @@
import { computed } from "mobx";
import { Server } from "../domain";
import { application_store } from "../../application/stores/ApplicationStore";
import { EnumMap } from "../enums";
import { EnumMap } from "../../../core/enums";
/**
* Map with a guaranteed value per server.
@ -15,6 +14,6 @@ export class ServerMap<V> extends EnumMap<Server, V> {
* @returns the value for the current server as set in {@link application_store}.
*/
@computed get current(): V {
return this.get(application_store.current_server);
return this.get(Server.Ephinea);
}
}

View File

@ -1,5 +1,5 @@
import React, { Component, ReactNode } from "react";
import { Renderer } from "../rendering/Renderer";
import { Renderer } from "../../../core/rendering/Renderer";
type Props = {
renderer: Renderer;

View File

@ -1,5 +1,5 @@
import { Episode } from "../../core/data_formats/parsing/quest/Episode";
import { NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { Episode } from "../../../core/data_formats/parsing/quest/Episode";
import { NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
import { computed, observable } from "mobx";
import { ItemType } from "../../core/domain/items";
import { Difficulty, SectionId } from "../../core/domain";

View File

@ -5,7 +5,7 @@ import { QuestDto } from "../../core/dto";
import { Loadable } from "../../core/Loadable";
import { hunt_method_persister } from "../persistence/HuntMethodPersister";
import { ServerMap } from "../../core/stores/ServerMap";
import { NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
import { HuntMethod, SimpleQuest } from "../domain";
const logger = Logger.get("stores/HuntMethodStore");

View File

@ -7,14 +7,14 @@ import {
RARE_ENEMY_PROB,
SectionId,
SectionIds,
Server,
} from "../../core/domain";
import { hunt_optimizer_persister } from "../persistence/HuntOptimizerPersister";
import { application_store } from "../../application/stores/ApplicationStore";
import { hunt_method_store } from "./HuntMethodStore";
import { item_drop_stores } from "./ItemDropStore";
import { item_type_stores } from "../../core/stores/ItemTypeStore";
import { Episode } from "../../core/data_formats/parsing/quest/Episode";
import { npc_data, NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { Episode } from "../../../core/data_formats/parsing/quest/Episode";
import { npc_data, NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
import { HuntMethod } from "../domain";
import { ItemType } from "../../core/domain/items";
@ -334,15 +334,10 @@ class HuntOptimizerStore {
}
private initialize_persistence = async () => {
this.wanted_items.replace(
await hunt_optimizer_persister.load_wanted_items(application_store.current_server),
);
this.wanted_items.replace(await hunt_optimizer_persister.load_wanted_items(Server.Ephinea));
autorun(() => {
hunt_optimizer_persister.persist_wanted_items(
application_store.current_server,
this.wanted_items,
);
hunt_optimizer_persister.persist_wanted_items(Server.Ephinea, this.wanted_items);
});
};
}

View File

@ -5,7 +5,7 @@ import { Loadable } from "../../core/Loadable";
import { item_type_stores } from "../../core/stores/ItemTypeStore";
import { ServerMap } from "../../core/stores/ServerMap";
import Logger from "js-logger";
import { NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
import { EnemyDrop } from "../domain";
const logger = Logger.get("stores/ItemDropStore");

View File

@ -6,12 +6,12 @@ import { AutoSizer, Index, SortDirection } from "react-virtualized";
import { hunt_method_store } from "../stores/HuntMethodStore";
import { BigTable, Column, ColumnSort } from "../../core/ui/BigTable";
import styles from "./MethodsComponent.css";
import { Episode } from "../../core/data_formats/parsing/quest/Episode";
import { Episode } from "../../../core/data_formats/parsing/quest/Episode";
import {
ENEMY_NPC_TYPES,
npc_data,
NpcType,
} from "../../core/data_formats/parsing/quest/npc_types";
} from "../../../core/data_formats/parsing/quest/npc_types";
import { HuntMethod } from "../domain";
@observer

View File

@ -8,7 +8,7 @@ import { BigTable, Column } from "../../core/ui/BigTable";
import { SectionIdIcon } from "../../core/ui/SectionIdIcon";
import { hours_to_string } from "../../core/ui/time";
import styles from "./OptimizationResultComponent.css";
import { Episode } from "../../core/data_formats/parsing/quest/Episode";
import { Episode } from "../../../core/data_formats/parsing/quest/Episode";
@observer
export class OptimizationResultComponent extends Component {

View File

@ -1,8 +1,8 @@
import { action, computed, observable } from "mobx";
import { check_episode, Episode } from "../../core/data_formats/parsing/quest/Episode";
import { check_episode, Episode } from "../../../core/data_formats/parsing/quest/Episode";
import { ObservableAreaVariant } from "./ObservableAreaVariant";
import { area_store } from "../stores/AreaStore";
import { DatUnknown } from "../../core/data_formats/parsing/quest/dat";
import { DatUnknown } from "../../../core/data_formats/parsing/quest/dat";
import { Segment } from "../scripting/instructions";
import Logger from "js-logger";
import { ObservableQuestNpc, ObservableQuestObject } from "./observable_quest_entities";

View File

@ -1,4 +1,4 @@
import { Vec3 } from "../../core/data_formats/vector";
import { Vec3 } from "../../../core/data_formats/vector";
export class Section {
readonly id: number;

View File

@ -1,9 +1,9 @@
import { ObjectType } from "../../core/data_formats/parsing/quest/object_types";
import { ObjectType } from "../../../core/data_formats/parsing/quest/object_types";
import { action, computed, observable } from "mobx";
import { Vec3 } from "../../core/data_formats/vector";
import { EntityType } from "../../core/data_formats/parsing/quest/entities";
import { Vec3 } from "../../../core/data_formats/vector";
import { EntityType } from "../../../core/data_formats/parsing/quest/entities";
import { Section } from "./Section";
import { NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
/**
* Abstract class from which ObservableQuestNpc and ObservableQuestObject derive.

View File

@ -1,16 +1,16 @@
import { Object3D } from "three";
import { Endianness } from "../../core/data_formats/Endianness";
import { ArrayBufferCursor } from "../../core/data_formats/cursor/ArrayBufferCursor";
import { parse_area_collision_geometry } from "../../core/data_formats/parsing/area_collision_geometry";
import { parse_area_geometry } from "../../core/data_formats/parsing/area_geometry";
import { Endianness } from "../../../core/data_formats/Endianness";
import { ArrayBufferCursor } from "../../../core/data_formats/cursor/ArrayBufferCursor";
import { parse_area_collision_geometry } from "../../../core/data_formats/parsing/area_collision_geometry";
import { parse_area_geometry } from "../../../core/data_formats/parsing/area_geometry";
import {
area_collision_geometry_to_object_3d,
area_geometry_to_sections_and_object_3d,
} from "../rendering/conversion/areas";
import { load_array_buffer } from "../../core/loading";
import { load_array_buffer } from "../../../core/loading";
import { LoadingCache } from "./LoadingCache";
import { Section } from "../domain/Section";
import { Episode } from "../../core/data_formats/parsing/quest/Episode";
import { Episode } from "../../../core/data_formats/parsing/quest/Episode";
const render_geometry_cache = new LoadingCache<
string,

View File

@ -1,15 +1,15 @@
import { Texture, CylinderBufferGeometry, BufferGeometry } from "three";
import Logger from "js-logger";
import { LoadingCache } from "./LoadingCache";
import { Endianness } from "../../core/data_formats/Endianness";
import { ArrayBufferCursor } from "../../core/data_formats/cursor/ArrayBufferCursor";
import { ninja_object_to_buffer_geometry } from "../../core/rendering/conversion/ninja_geometry";
import { parse_nj, parse_xj } from "../../core/data_formats/parsing/ninja";
import { parse_xvm } from "../../core/data_formats/parsing/ninja/texture";
import { xvm_to_textures } from "../../core/rendering/conversion/ninja_textures";
import { load_array_buffer } from "../../core/loading";
import { object_data, ObjectType } from "../../core/data_formats/parsing/quest/object_types";
import { NpcType } from "../../core/data_formats/parsing/quest/npc_types";
import { Endianness } from "../../../core/data_formats/Endianness";
import { ArrayBufferCursor } from "../../../core/data_formats/cursor/ArrayBufferCursor";
import { ninja_object_to_buffer_geometry } from "../../../core/rendering/conversion/ninja_geometry";
import { parse_nj, parse_xj } from "../../../core/data_formats/parsing/ninja";
import { parse_xvm } from "../../../core/data_formats/parsing/ninja/texture";
import { xvm_to_textures } from "../../../core/rendering/conversion/ninja_textures";
import { load_array_buffer } from "../../../core/loading";
import { object_data, ObjectType } from "../../../core/data_formats/parsing/quest/object_types";
import { NpcType } from "../../../core/data_formats/parsing/quest/npc_types";
const logger = Logger.get("loading/entities");

Some files were not shown because too many files have changed in this diff Show More