-
Notifications
You must be signed in to change notification settings - Fork 135
Bundle PlayCanvas Engine into Editor #1674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
willeastcott
wants to merge
5
commits into
main
Choose a base branch
from
bundle-engine
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8759d3f
Bundle PlayCanvas Engine into Editor
willeastcott 523a6eb
Add pc-globals.ts
willeastcott 2b9b5a1
Fix options for BoxGeometry constructor
willeastcott cd7482f
Lint fixes
willeastcott cb7affe
Merge branch 'main' into bundle-engine
kpal81xd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,48 @@ | ||
| import { version } from 'playcanvas'; | ||
|
|
||
| // Re-export engine constants for backward compatibility | ||
| export { | ||
| // Layer IDs | ||
| LAYERID_WORLD, | ||
| LAYERID_DEPTH, | ||
| LAYERID_SKYBOX, | ||
| LAYERID_IMMEDIATE, | ||
| LAYERID_UI, | ||
| // Gamma correction modes | ||
| GAMMA_NONE, | ||
| GAMMA_SRGB, | ||
| // Curve types | ||
| CURVE_LINEAR, | ||
| CURVE_SMOOTHSTEP, | ||
| CURVE_SPLINE, | ||
| CURVE_STEP, | ||
| // Anim constants | ||
| ANIM_INTERRUPTION_NONE, | ||
| ANIM_INTERRUPTION_PREV, | ||
| ANIM_INTERRUPTION_NEXT, | ||
| ANIM_INTERRUPTION_PREV_NEXT, | ||
| ANIM_INTERRUPTION_NEXT_PREV, | ||
| ANIM_GREATER_THAN, | ||
| ANIM_LESS_THAN, | ||
| ANIM_GREATER_THAN_EQUAL_TO, | ||
| ANIM_LESS_THAN_EQUAL_TO, | ||
| ANIM_EQUAL_TO, | ||
| ANIM_NOT_EQUAL_TO, | ||
| ANIM_PARAMETER_INTEGER, | ||
| ANIM_PARAMETER_FLOAT, | ||
| ANIM_PARAMETER_BOOLEAN, | ||
| ANIM_PARAMETER_TRIGGER | ||
| } from 'playcanvas'; | ||
|
Comment on lines
+4
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to rexport - just use the values directly. Any backwards compatible constants should be explicitly defined in this file |
||
|
|
||
| // Editor Engine version | ||
| export const ENGINE_VERSION = typeof pc !== 'undefined' ? `${pc.version}` : '0.0.0'; | ||
| export const ENGINE_VERSION = version; | ||
|
|
||
| // Gizmo mask | ||
| export const GIZMO_MASK = 8; | ||
|
|
||
| // Picker force pick tag | ||
| export const FORCE_PICK_TAG = 'force-pick'; | ||
|
|
||
| // Layer ids | ||
| export const LAYERID_WORLD = 0; | ||
| export const LAYERID_DEPTH = 1; | ||
| export const LAYERID_SKYBOX = 2; | ||
| export const LAYERID_IMMEDIATE = 3; | ||
| export const LAYERID_UI = 4; | ||
|
|
||
| // Gamma correction modes | ||
| export const GAMMA_NONE = 0; | ||
| export const GAMMA_SRGB = 1; | ||
|
|
||
| // Tonemapping modes | ||
| export const TONEMAPPING = [ | ||
| 'Linear', | ||
|
|
@@ -49,36 +74,15 @@ export const SCROLLBAR_VISIBILITY_SHOW_ALWAYS = 0; | |
| export const SCROLLBAR_VISIBILITY_SHOW_WHEN_REQUIRED = 1; | ||
|
|
||
|
|
||
| export const CURVE_LINEAR = 0; | ||
| export const CURVE_SMOOTHSTEP = 1; | ||
| // Editor-specific curve types (not in engine) | ||
| export const CURVE_CATMULL = 2; | ||
| export const CURVE_CARDINAL = 3; | ||
| export const CURVE_SPLINE = 4; | ||
| export const CURVE_STEP = 5; | ||
|
|
||
| // Script Loading Type | ||
| export const LOAD_SCRIPT_AS_ASSET = 0; | ||
| export const LOAD_SCRIPT_BEFORE_ENGINE = 1; | ||
| export const LOAD_SCRIPT_AFTER_ENGINE = 2; | ||
|
|
||
| // Anim system constants | ||
| export const ANIM_INTERRUPTION_NONE = 'NONE'; | ||
| export const ANIM_INTERRUPTION_PREV = 'PREV_STATE'; | ||
| export const ANIM_INTERRUPTION_NEXT = 'NEXT_STATE'; | ||
| export const ANIM_INTERRUPTION_PREV_NEXT = 'PREV_STATE_NEXT_STATE'; | ||
| export const ANIM_INTERRUPTION_NEXT_PREV = 'NEXT_STATE_PREV_STATE'; | ||
|
|
||
| export const ANIM_GREATER_THAN = 'GREATER_THAN'; | ||
| export const ANIM_LESS_THAN = 'LESS_THAN'; | ||
| export const ANIM_GREATER_THAN_EQUAL_TO = 'GREATER_THAN_EQUAL_TO'; | ||
| export const ANIM_LESS_THAN_EQUAL_TO = 'LESS_THAN_EQUAL_TO'; | ||
| export const ANIM_EQUAL_TO = 'EQUAL_TO'; | ||
| export const ANIM_NOT_EQUAL_TO = 'NOT_EQUAL_TO'; | ||
|
|
||
| export const ANIM_PARAMETER_INTEGER = 'INTEGER'; | ||
| export const ANIM_PARAMETER_FLOAT = 'FLOAT'; | ||
| export const ANIM_PARAMETER_BOOLEAN = 'BOOLEAN'; | ||
| export const ANIM_PARAMETER_TRIGGER = 'TRIGGER'; | ||
|
|
||
| // VERSION CONTROL | ||
| export const MERGE_STATUS_AUTO_STARTED = 'merge_auto_started'; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should try not casting to any - use exact typing since we have it available