Skip to content

Commit

Permalink
WIP Engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Nov 30, 2024
1 parent 362232b commit 0cc9cb3
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 210 deletions.
3 changes: 2 additions & 1 deletion src/texts/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const texts = {
zoomIn: 'Zoom In',
zoomOut: 'Zoom Out',
webGL: 'Web GL',
webGLHints: 'Use WebGL as alternative renderer. Requires restart',
webGLHints1: 'Use WebGL as alternative renderer.',
webGLHints2: 'Require manual refresh (F5)',
},
};
21 changes: 13 additions & 8 deletions src/wireframes/components/properties/Experimental.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ export const Experimental = () => {
}, [dispatch]);

return (
<Row className='property'>
<Col span={12} className='property-label'>{texts.common.webGL}</Col>
<Col span={12} className='property-value'>
<Checkbox checked={useWebGL}
onChange={doChangeWebGL} />
<>
<Row className='property'>
<div>{texts.common.webGLHints1}</div>
<div>{texts.common.webGLHints2}</div>
</Row>

<div>{texts.common.webGLHints}</div>
</Col>
</Row>
<Row className='property'>
<Col span={6} className='property-label'>{texts.common.webGL}</Col>
<Col span={18} className='property-value'>
<Checkbox checked={useWebGL}
onChange={doChangeWebGL} />
</Col>
</Row>
</>
);
};
4 changes: 2 additions & 2 deletions src/wireframes/engine/pixi/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class PixiEngine implements Engine {
const engineEvent =
new EngineMouseEvent(
event,
new Vec2(x, y));
new Vec2(Math.round(x), Math.round(y)));

return engineEvent;
};
Expand Down Expand Up @@ -135,7 +135,7 @@ export class PixiEngine implements Engine {
const engineEvent =
new EngineHitEvent(
event,
new Vec2(x, y),
new Vec2(Math.round(x), Math.round(y)),
eventObject,
eventItem,
hit);
Expand Down
Loading

0 comments on commit 0cc9cb3

Please sign in to comment.