lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
60 lines • 1.77 kB
JavaScript
import { pt3d0 } from "../display/utils/reusables";
import { appendableDefaults, appendableSchema } from "./IAppendable";
import { extendDefaults } from "./utils/Defaults";
import { nullableCallback } from "./utils/NullableCallback";
export class LingoMouseEvent {
x;
y;
clientX;
clientY;
xNorm;
yNorm;
point;
normal;
distance;
target;
constructor(x, y, clientX, clientY, xNorm, yNorm, point, normal, distance, target) {
this.x = x;
this.y = y;
this.clientX = clientX;
this.clientY = clientY;
this.xNorm = xNorm;
this.yNorm = yNorm;
this.point = point;
this.normal = normal;
this.distance = distance;
this.target = target;
}
}
export const lingoMouseEvent = new LingoMouseEvent(0, 0, 0, 0, 0, 0, pt3d0, pt3d0, 0, undefined);
export class SimpleMouseEvent {
x;
y;
clientX;
clientY;
constructor(x, y, clientX, clientY) {
this.x = x;
this.y = y;
this.clientX = clientX;
this.clientY = clientY;
}
}
const simpleMouseEvent = new SimpleMouseEvent(0, 0, 0, 0);
export const mouseSchema = {
...appendableSchema,
onClick: Function,
onRightClick: Function,
onMouseMove: Function,
onMouseDown: Function,
onMouseUp: Function,
onMousePress: Function
};
export const mouseDefaults = extendDefaults([appendableDefaults], {
onClick: nullableCallback(simpleMouseEvent),
onRightClick: nullableCallback(simpleMouseEvent),
onMouseMove: nullableCallback(simpleMouseEvent),
onMouseDown: nullableCallback(simpleMouseEvent),
onMouseUp: nullableCallback(simpleMouseEvent),
onMousePress: nullableCallback(simpleMouseEvent)
});
//# sourceMappingURL=IMouse.js.map