core/engine
엔진.
Engine.
EngineConfigurationextends Object
엔진 설정.
Engine configuration.
import { Engine, EngineConfiguration, Scene, Vector2, ViewScaleMode, ColorSpace } from "./build/vanilla.js";
const engineConfiguration = new EngineConfiguration();
engineConfiguration.canvasId = "gameCanvas";
engineConfiguration.title = "My Game";
engineConfiguration.referenceResolutionSize = Vector2.create(1920, 1080);
engineConfiguration.viewScaleMode = ViewScaleMode.stretchShortExpandLong;
engineConfiguration.autoResizeOnWindowResize = true;
engineConfiguration.maximumFramePerSecond = 60;
engineConfiguration.antialias = true;
engineConfiguration.useStatistics = true;
engineConfiguration.useDevTools = false;
engineConfiguration.colorSpace = ColorSpace.gamma;
const engine = new Engine(engineConfiguration);
engine.run(new Scene());기준 해상도.
Reference resolution.
반환ReturnsVector2
짝Counterpart: vanilla-engine EngineConfiguration.reference_resolution_size
뷰 스케일 모드. (기본 ViewScaleMode.stretchShort, 엔진이 만들 때 뷰 매니저에 넣는다. UIScene 과 GameScene 은 initialize 에서 저마다의 모드로 바꾼다)
View scale mode. (Default ViewScaleMode.stretchShort, put into the view manager when the engine is created. UIScene and GameScene switch to their own mode in initialize)
반환Returnsstring
짝Counterpart: vanilla-engine EngineConfiguration.view_scale_mode
캔버스 식별자. 문서에 그 id 의 요소가 없으면 캔버스를 새로 만들어 그 id 를 주고 body 끝에 붙인다.
Canvas identifier. If the document has no element with that id, a new canvas is created with that id and appended to the end of body.
반환Returnsstring
짝Counterpart: vanilla-engine EngineConfiguration.canvas_id
정보창 출력 여부.
Whether to show the info window.
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.use_statistics
윈도우가 리사이즈 될 때 캔버스 사이즈 자동 반영.
Automatically applies the canvas size when the window is resized.
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.auto_resize_on_window_resize
프레임이 끝난 뒤에도 그린 것을 캔버스에 남길지. 캔버스 위에 후처리를 얹는 프로젝트가 켠다. (다른 캔버스가 texImage2D 나 drawImage 로 읽으려면 필요하다) 한 번 더 복사하는 만큼 비용이 있다.
Whether to keep the drawing on the canvas after the frame ends. Projects that layer post-processing on top of the canvas turn it on. (Needed for another canvas to read it with texImage2D or drawImage) It costs one extra copy.
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.preserve_drawing_buffer
캔버스(기본 프레임 버퍼)의 멀티샘플 안티에일리어싱(MSAA)을 켤지. 생성 때 정한다. 켜면(기본) 지금까지와 같다. 끄면 도형과 3D 의 가장자리가 계단져 보이는 대신 고해상도 모바일에서 프레임마다 드는 리졸브 비용이 빠진다. (웹은 WebGL 컨텍스트 속성 antialias 로 켬과 끔만 고르고 표본 수는 브라우저가 정한다. 데스크탑은 켜면 표본 4) 후처리(ToonPostProcess)가 자기 MSAA 판에 그리므로 그걸 쓰는 게임은 캔버스 antialias 를 false 로 짓는다. true 면 캔버스 자체가 MSAA 라 화면에 옮기는 패스와 UI 가 표본마다 섞여 값이 더 든다. (맥미니 2560x1440 툰 후처리 장면 GPU 처리량 6.89 → 6.49 ms, 끈 판 6.81 → 5.22 ms) 예: engineConfiguration.antialias = false; (ToonPostProcess 를 쓰는 게임)
Whether to enable multisample anti-aliasing (MSAA) on the canvas (default framebuffer). Set at creation. On (default) keeps the previous behavior. Off makes the edges of shapes and 3D look stepped, but removes the per-frame resolve cost on high-resolution mobile devices. (On the web it only chooses on or off through the WebGL context attribute antialias and the browser picks the sample count. On desktop, on means 4 samples) A game that uses a post process (ToonPostProcess) should build the canvas with antialias set to false, because the post process draws into its own MSAA target. With true, the canvas itself is MSAA, so the pass that copies to the screen and the UI blend per sample and cost more. (Mac mini, 2560x1440 toon post process scene, GPU throughput 6.89 → 6.49 ms, with it off 6.81 → 5.22 ms) Example: engineConfiguration.antialias = false; (for a game that uses ToonPostProcess)
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.antialias
최대 FPS. 0 이면 제한하지 않는다. (화면 주사율을 따른다) 정하면 그보다 빨리 온 프레임은 건너뛰어 주사율이 높거나 프레임이 들쭉날쭉한 기기에서도 고른 간격으로 돈다.
Maximum FPS. 0 means no limit. (Follows the display refresh rate) When set, frames arriving sooner than that are skipped so it runs at even intervals even on devices with high refresh rates or uneven frames.
반환Returnsnumber
짝Counterpart: vanilla-engine EngineConfiguration.maximum_frame_per_second
기본 글꼴 주소. (처음은 빈 글, 러스트 판 default_font_url 과 같다) 주면 run() 이 뒤에서 받아 글꼴 이름 "default" 로 올린다.
- 글꼴 이름 "default"(엔진 기본 글꼴 사슬)의 첫 글꼴이 되고, 그 뒤는 시스템 글꼴 사슬 SYSTEM_FONT_STRING 이다. 비우면 받지 않고 시스템 글꼴로 그린다.
- 엔진은 글꼴을 따로 받지 않는다. 게임 글꼴은 이 주소나 FontAsset 으로 넣는다.
Default font address. (empty at first, same as Rust default_font_url) When given, run() fetches it in the background and adds it under the font name "default".
- It becomes the first font of the font name "default" (the engine default font chain), followed by the system font chain SYSTEM_FONT_STRING. When empty, nothing is fetched and text is drawn with the system font.
- The engine fetches no font of its own. Give game fonts with this address or a FontAsset.
반환Returnsstring
짝Counterpart: vanilla-engine EngineConfiguration.default_font_url
글자 입력칸이 포커스된 동안 가로는 그대로이고 세로만 줄어드는 리사이즈를 무시할지. (모바일의 화면 키보드) 끄면(기본) iOS 사파리에서 키보드가 뜰 때 visualViewport 의 세로가 줄어 캔버스와 화면 전체가 작아진다. 키보드가 내려가면 다시 맞춘다.
Whether to ignore resizes where the width stays the same and only the height shrinks while a text input field is focused. (On-screen keyboard on mobile) When off (default), on iOS Safari the visualViewport height shrinks when the keyboard appears, making the canvas and the whole screen smaller. It readjusts when the keyboard goes down.
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.ignore_virtual_keyboard_resize
웹 폰트가 늦게 받아지면 그 폰트로 구운 글자 텍스처 가운데 그 폰트의 글자 범위에 든 것만 버려 다시 굽게 할지. 끄면(기본) 받기 전에 다른 폰트로 구운 글자는 캐시에서 밀려날 때까지 그대로 남는다. (unicode-range 로 나눈 폰트 조각을 그때그때 받는 프로젝트가 켠다. 받은 조각마다 그 글자만 다시 구우므로 프레임이 크게 길어지지 않는다)
When a web font arrives late, whether to discard only the glyph textures baked with that font that fall within that font's character range, so they are baked again. When off (default), glyphs baked with another font before it arrived stay until they are pushed out of the cache. (Turned on by projects that fetch font pieces split by unicode-range on demand. Only those glyphs are rebaked for each received piece, so frames do not get much longer)
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.rebake_text_on_font_load
개발자 도구(F2 로 여닫는 패널과 기즈모)를 쓸지. 끄면 GameScene 이 만들지 않고 F2 도 받지 않는다. (켜면(기본) 지금까지와 같다. 출시 빌드처럼 사용자에게 보이면 안 되는 곳에서 끈다)
Whether to use the developer tools (the panel and gizmos toggled with F2). When off, GameScene does not create them and F2 is not handled either. (When on (default), same as before. Turn it off where they must not be visible to users, like release builds)
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.use_dev_tools
캔버스의 긴 쪽이 짧은 쪽의 몇 배까지인지. 0 이면 제한하지 않는다. (기본, 지금까지와 같다) 정하면 autoResizeOnWindowResize 로 맞출 때 창이 그보다 길쭉하면 캔버스를 그 비까지 줄여 창의 가운데에 둔다. (남는 곳은 페이지의 바탕) (게임 영역의 가로세로 비를 제한하는 포털처럼, 캔버스가 창을 다 채우면 안 되는 곳에서 정한다)
How many times the short side the canvas's long side may be. 0 means no limit. (default, same as before) When set, if the window is more elongated than that when fitting with autoResizeOnWindowResize, the canvas is shrunk to that ratio and centered in the window. (The remaining space is the page background) (Set where the canvas must not fill the whole window, like portals that limit the aspect ratio of the game area)
반환Returnsnumber
짝Counterpart: vanilla-engine EngineConfiguration.max_canvas_aspect_ratio
손을 뗄 때(touchend, pointerup)에도 오디오 컨텍스트를 깨울지. 생성 때 정한다. 끄면(기본) 지금까지처럼 click, touchstart, keydown 에서만 깨운다. touchstart 는 사용자 활성화를 주지 않아, iOS WebKit 에서 앱 전환이나 전면 광고로 멈춘(suspended, interrupted) 컨텍스트를 화면을 끌기만 하는 게임이 다시 깨우지 못했다. (캔버스를 끄는 조작이 기본 동작을 막아 click 이 생기지 않는 게임이 켠다)
Whether to also wake the audio context on release (touchend, pointerup). Set at construction. When off (default), wakes only on click, touchstart and keydown as before. touchstart does not grant user activation, so on iOS WebKit, games that only drag on the screen could not wake a context stopped (suspended, interrupted) by app switching or full-screen ads. (Turned on by games where dragging the canvas prevents the default behavior so no click occurs)
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.resume_audio_on_touch_end
3D 색 공간. (ColorSpace.gamma 가 기본, 지금까지와 같은 화면. ColorSpace.linear 면 sRGB 텍스처와 sRGB 표준 곡선으로 선형 공간에서 빛을 셈한다) 생성 때 정한다. 툰 렌더러, 후처리, 화면 바깥선, GLB 읽기가 따로 받지 않으면 이 값을 따른다. 2D 는 어느 값이든 감마 공간에서 합성한다. (유니티 Player Settings 의 Color Space)
3D color space. (ColorSpace.gamma is the default, the same screen as before. ColorSpace.linear computes lighting in linear space with sRGB textures and the sRGB standard curve) Set at creation. The toon renderer, post process, screen outline and GLB reading follow this value unless given their own. 2D composites in gamma space either way. (Color Space in Unity's Player Settings)
반환Returnsstring
짝Counterpart: vanilla-engine EngineConfiguration.color_space
GPU 메모리 셈(개발용)을 처음부터 켤지. 생성 때 정한다. 끄면(기본) GL 짓기 호출을 가로채지 않아 프레임 CPU 에 드는 값이 없다. 켜면 엔진이 처음 짓는 자원까지 센다. 나중에 켜려면 Engine.enableGpuMemoryTracking() 이고 그 뒤에 지은 것부터 센다. 예: engineConfiguration.trackGpuMemory = true; (프로파일링 때)
Whether to turn on GPU memory tracking (for development) from the start. Set at creation. When off (the default), GL create calls are not intercepted, so there is no per-frame CPU cost. When on, the resources the engine creates first are counted too. To turn it on later use Engine.enableGpuMemoryTracking(), which counts what is created after that. Example: engineConfiguration.trackGpuMemory = true; (when profiling)
반환Returnsboolean
짝Counterpart: vanilla-engine EngineConfiguration.track_gpu_memory
Engineextends Object
엔진.
Engine.
import { Engine, EngineConfiguration, Scene, Vector2, Rect, Colors } from "./build/vanilla.js";
class MainScene extends Scene {
draw(graphic) {
super.draw(graphic);
graphic.setFillColor(Colors.white);
graphic.drawRect(Rect.create(100, 100, 200, 120));
}
}
const engineConfiguration = new EngineConfiguration();
engineConfiguration.referenceResolutionSize = Vector2.create(1280, 720);
engineConfiguration.autoResizeOnWindowResize = true;
const engine = new Engine(engineConfiguration);
engine.run(new MainScene());생성.
Constructor.
- engineConfigurationEngineConfiguration
- 엔진 설정. (EngineConfiguration 이 아니면 예외를 던진다)Engine configuration. (throws if it is not an EngineConfiguration)
짝Counterpart: vanilla-engine Engine.new
전역 인스턴스 반환.
Returns the global instance.
반환ReturnsEngine 마지막으로 만든 엔진. (만든 적이 없으면 undefined)The most recently created engine. (undefined if none was created)
짝Counterpart: vanilla-engine Engine.get_engine
시작.
Start.
- sceneScene
- 처음 불러올 씬. (Scene 이 아니면 예외를 던진다)Scene to load first. (throws if it is not a Scene)
짝Counterpart: vanilla-engine Engine.run
첫 user gesture (click/touch/keydown) 핸들러. AudioManager 에 user gesture 발생을 알리고 컨텍스트 재개를 시도한다.
First user gesture (click/touch/keydown) handler. Notifies AudioManager that a user gesture occurred and tries to resume the context.
짝Counterpart: vanilla-engine Engine.resume_on_user_gesture
글자 입력칸이 포커스되어 있는지. (input 의 글자 종류, textarea, contenteditable)
Whether a text input field is focused. (text-type input, textarea, contenteditable)
반환Returnsboolean 글자 입력칸이 포커스되어 있으면 참.True if a text input is focused.
짝Counterpart: vanilla-engine Engine.is_text_input_focused
웹페이지에 기반하는 이벤트 설정.
Sets up web page based events.
손가락 목록 갱신. (터치 사건의 바뀐 손가락마다 닿음, 움직임, 뗌을 적고, 사건의 touches 에 없는 손가락은 취소로 지운다)
Updates the finger list. (Records touch, move and release for each changed finger of the touch event, and removes fingers not in the event's touches as cancelled)
- touchEventTouchEvent
- 브라우저의 터치 사건.The browser touch event.
입력 좌표 갱신.
Updates input coordinates.
- xnumber
- 클라이언트 X 좌표. (CSS 픽셀, clientX)Client X coordinate. (CSS pixels, clientX)
- ynumber
- 클라이언트 Y 좌표. (CSS 픽셀, clientY)Client Y coordinate. (CSS pixels, clientY)
개발 관련 정보 출력.
Outputs development information.
- graphicGraphic
- 그릴 그래픽.Graphic to draw with.
엔진 갱신.
Engine update.
- timestampnumber
- requestAnimationFrame 이 넘긴 시각. (밀리초)Timestamp passed by requestAnimationFrame. (milliseconds)
GPU 처리량 재기. (지금 장면을 갱신 없이 그리기만 잇달아 하고 GPU 가 다 그리길 기다린 프레임당 시간)
- 지금 장면을 씬 갱신(tick) 없이 엔진 프레임과 같은 그리기 길로 frameCount 번 잇달아 그리고, 1 화소 readPixels 로 GPU 가 다 그리길 기다린 벽시계 시간을 프레임 수로 나눈다. 렌더러(스크립트와 GL 명령 쓰기), GPU 프로세스(명령 풀기), GPU 실행 가운데 가장 느린 단의 몫이다. GPU 가 가장 느리면 GPU 가 실제로 한 프레임을 그리는 시간이다. (크롬 트레이스의 GPU 프로세스 메인 스레드 시간은 명령을 푸는 CPU 시간이라 GPU 가 그리는 양이 바뀌어도 거의 움직이지 않는다)
- 다음 rAF 부터 시작한다. 데움 10 프레임 뒤 30 프레임씩 덩이로 나눠 rAF 하나에 한 덩이를 그리고 덩이마다 GPU 를 기다린다. (한 번에 길게 막지 않는다, 덩이 사이는 재지 않는다)
- 재는 동안 엔진 시간, 입력, 엔진 프레임 함수, 프레임 번호, 화면 크기 맞추기, 찍기는 서 있고 씬의 tick 을 부르지 않는다. 씬의 draw 가 게임 상태를 바꾸지 않으면 게임 상태는 그대로다. 다 재면 엔진 루프가 그대로 이어 돈다. (이어 도는 첫 프레임 간격은 탭을 숨겼다 돌아올 때처럼 TimeManager 의 간격 상한 안이다, 기본 0.25 초)
- 같은 상태를 되풀이해 그리므로 바뀐 것만 다시 그리는 캐시(그림자 onChange 같은)는 다시 굽지 않는다. 움직이는 장면에서 프레임마다 다시 굽는 비용은 들지 않는다.
- 캔버스의 기본 프레임 버퍼에 잇달아 그려 화면에 내는 것(합성)은 덩이마다 마지막 프레임만 한다. 합성 비용은 들지 않는다.
- 페이지가 가려져 rAF 가 서면 기다린다. 재는 중에 또 부르거나 엔진 루프가 돌기 전이면 거부한다.
Measures GPU throughput. (Time per frame for drawing the current scene repeatedly without updates and waiting until the GPU finishes drawing)
- Draws the current scene frameCount times in a row through the same drawing path as an engine frame without scene updates (tick), waits with a 1-pixel readPixels until the GPU finishes drawing, and divides the wall-clock time by the frame count. It is the share of the slowest stage among the renderer (script and writing GL commands), the GPU process (decoding commands) and GPU execution. When the GPU is the slowest, it is the time the GPU actually takes to draw a frame. (The GPU process main thread time in a Chrome trace is CPU time for decoding commands, so it barely moves even when the amount the GPU draws changes)
- Starts from the next rAF. After 10 warm-up frames, it splits the frames into chunks of 30, draws one chunk per rAF and waits for the GPU after each chunk. (It does not block for long at once, and the time between chunks is not measured)
- While measuring, engine time, input, engine frame callbacks, the frame number, canvas resizing and capture stand still, and the scenes' tick is not called. If the scenes' draw does not change game state, game state stays the same. When it finishes, the engine loop continues as it was. (The first frame interval after resuming is within the TimeManager interval limit, as when a hidden tab comes back, 0.25 seconds by default)
- Because the same state is drawn repeatedly, caches that redraw only what changed (such as onChange shadows) do not rebake. The cost of rebaking every frame in a moving scene is not included.
- Drawing to the canvas default framebuffer repeatedly presents (composites) only the last frame of each chunk. Compositing cost is not included.
- If the page is hidden and rAF stops, it waits. Calling it again while measuring, or before the engine loop runs, is rejected.
- frameCountnumber
- 잴 프레임 수. (1 이상의 정수, 데움은 빼고 센다)Number of frames to measure. (Integer of 1 or more, counted without the warm-up)
반환ReturnsPromise<{ frameCount: number, chunkFrameCount: number, millisecondsPerFrame: number, chunkMillisecondsPerFrame: number[] }> 잰 프레임 수, 덩이 프레임 수, 프레임당 시간(밀리초, 모든 덩이 시간의 합 / 프레임 수), 덩이마다 프레임당 시간(밀리초).Measured frame count, chunk frame count, time per frame (milliseconds, sum of all chunk times / frame count), and time per frame for each chunk (milliseconds).
짝Counterpart: vanilla-engine Engine.measure_gpu_throughput
import { Engine, EngineConfiguration, Scene, Rect, Vector2 } from "./build/vanilla.js";
class MainScene extends Scene {
draw(graphic) {
super.draw(graphic);
graphic.setFillColor("#203040");
graphic.drawRect(Rect.create(0, 0, 640, 360));
}
}
const engineConfiguration = new EngineConfiguration();
engineConfiguration.referenceResolutionSize = Vector2.create(640, 360);
const engine = new Engine(engineConfiguration);
engine.run(new MainScene());
const timeBefore = engine.getTimeManager().getTime();
const result = await Engine.getEngine().measureGpuThroughput(60);
const timeAfter = engine.getTimeManager().getTime();
console.log(result.frameCount, result.chunkMillisecondsPerFrame.length, result.millisecondsPerFrame > 0, timeBefore === timeAfter);커서 보이기 설정.
Sets cursor visibility.
- visibledboolean
- 참이면 body 의 커서를 기본 커서로, 거짓이면 숨긴다.If true, sets the body cursor to the default cursor; if false, hides it.
짝Counterpart: vanilla-engine Engine.set_visible_cursor
캔버스 정보 반환.
Returns canvas information.
반환ReturnsHTMLCanvasElement 엔진이 그리는 캔버스.The canvas the engine draws to.
짝Counterpart: vanilla-engine Engine.get_canvas
플랫폼 정보 반환.
Returns platform information.
반환ReturnsPlatform 플랫폼 정보.Platform information.
짝Counterpart: vanilla-engine Engine.get_platform
시간 매니저 반환.
Returns the time manager.
반환ReturnsTimeManager 시간 매니저.Time manager.
짝Counterpart: vanilla-engine Engine.get_time_manager
뷰 매니저 반환.
Returns the view manager.
반환ReturnsViewManager 뷰 매니저.View manager.
짝Counterpart: vanilla-engine Engine.get_view_manager
입력 매니저 반환.
Returns the input manager.
반환ReturnsInputManager 입력 매니저.Input manager.
짝Counterpart: vanilla-engine Engine.get_input_manager
오디오 매니저 반환.
Returns the audio manager.
반환ReturnsAudioManager 오디오 매니저.The audio manager.
짝Counterpart: vanilla-engine Engine.get_audio_manager
렌더러 반환.
Returns the renderer.
반환ReturnsGraphic 렌더러.The renderer.
짝Counterpart: vanilla-engine Engine.get_graphic
3D 색 공간 반환. (생성 때 EngineConfiguration.colorSpace 로 정한 값, 툰 렌더러와 후처리의 기본값)
Returns the 3D color space. (The value set by EngineConfiguration.colorSpace at creation, the default of the toon renderer and post process)
반환Returnsstring ColorSpace.gamma 나 ColorSpace.linear.ColorSpace.gamma or ColorSpace.linear.
짝Counterpart: vanilla-engine Engine.get_color_space
import { Engine, EngineConfiguration, ColorSpace } from "./vanilla.js";
const engine = new Engine(new EngineConfiguration());
const exposure = engine.getColorSpace() === ColorSpace.linear ? 1.2 : 1;
if (engine.getColorSpace() !== ColorSpace.gamma || exposure !== 1) {
throw new Error("default color space is not gamma");
}버전 반환.
Returns the version.
반환Returnsstring 엔진 판 글. ("주.부.패치", 갈래가 있으면 "-갈래" 를 붙임)Engine version text. ("major.minor.patch", with "-branch" appended if there is a branch)
짝Counterpart: vanilla-engine Engine.get_version_string
최대 FPS 설정. (실행 중에 바꿀 수 있다, 0 이면 제한하지 않는다)
- EngineConfiguration.maximumFramePerSecond 에 적는다. 엔진은 프레임마다 그 값을 읽어, 바뀌면 그 프레임부터 다시 센다.
- 0 보다 작거나 숫자가 아니면 0 으로 둔다.
Sets the maximum FPS. (Can be changed while running, 0 means no limit)
- Writes to EngineConfiguration.maximumFramePerSecond. The engine reads that value every frame and, if it changed, starts counting again from that frame.
- Less than 0 or not a number is set to 0.
- maximumFramePerSecondnumber
- 최대 FPS. (0 이면 제한하지 않는다)Maximum FPS. (0 means no limit)
짝Counterpart: vanilla-engine Engine.set_maximum_frame_per_second
최대 FPS 반환. (0 이면 제한하지 않음)
Returns the maximum FPS. (0 means no limit)
반환Returnsnumber 최대 FPS. (0 이면 제한하지 않음)Maximum FPS. (0 means no limit)
짝Counterpart: vanilla-engine Engine.get_maximum_frame_per_second
엔진 설정 반환.
Returns the engine configuration.
반환ReturnsEngineConfiguration 생성 때 받은 엔진 설정.The engine configuration given at creation.
짝Counterpart: vanilla-engine Engine.get_engine_configuration
응용 프로그램 종료.
- Capacitor 네이티브면 App 플러그인으로 끝내고, 웹이면 창 닫기를 시도한다. (둘 다 환경에 따라 거부될 수 있으며 실패해도 예외를 내지 않는다)
Exits the application.
- On Capacitor native, exits through the App plugin; on the web, tries to close the window. (Both may be refused depending on the environment, and failure throws no exception)
짝Counterpart: vanilla-engine Engine.exit_application
바깥 주소 열기. (새 탭, 러스트 판 Engine::open_url 과 같다)
- 웹: window.open(주소, "_blank", "noopener") 로 새 탭에 연다. 기존 페이지는 새 탭이 건드릴 수 없다.
- 사용자 입력(누름, 탭, 키) 처리 안에서 부를 때만 열린다. 브라우저의 팝업 차단 규칙이다. 입력과 상관없이(타이머, 프레임) 부르면 막혀 열리지 않는다.
- 열 수 있는 것은 http, https, mailto, tel 뿐이다. 그 밖의 꼴(javascript:, file: 같은)은 열지 않고 false.
Opens an outside URL. (new tab, same as the Rust version's Engine::open_url)
- Web: opens it in a new tab with window.open(url, "_blank", "noopener"). The new tab cannot touch the existing page.
- It opens only when called inside user input (click, tap, key) handling. This is the browser's popup-blocking rule. Called regardless of input (timer, frame), it is blocked and does not open.
- Only http, https, mailto and tel can be opened. Other forms (such as javascript: and file:) are not opened and return false.
- urlstring
- 열 주소. (http, https, mailto, tel)URL to open. (http, https, mailto, tel)
반환Returnsboolean 열기를 브라우저에 넘겼으면 참. (브라우저가 막았거나 주소가 맞지 않으면 거짓)True if the open was handed to the browser. (false if the browser blocked it or the URL is not allowed)
짝Counterpart: vanilla-engine Engine.open_url
import { Engine, EngineConfiguration, Scene, Vector2 } from "./build/vanilla.js";
class MainScene extends Scene {
async load(engine) {
await super.load(engine);
const isOpened = engine.openUrl("javascript:alert(1)");
console.log(isOpened);
}
}
const engineConfiguration = new EngineConfiguration();
engineConfiguration.referenceResolutionSize = Vector2.create(640, 360);
const engine = new Engine(engineConfiguration);
engine.run(new MainScene());현지 시각 읽기. (지금에서 분 오프셋만큼 더한 때를 이 기계의 시간대로 본 달력 시각, 러스트 판 Engine::read_local_time 과 같다)
- 웹은 Date 로 읽는다. 더한 때의 일광 절약 시간까지 반영한다. (new Date(Date.now() + 오프셋) 과 같다)
Read the local time. (the calendar time of now plus a minute offset in this machine's time zone, same as the Rust edition's Engine::read_local_time)
- On the web it is read with Date. Daylight saving time at the shifted moment is applied. (same as new Date(Date.now() + offset))
- minuteOffsetnumber
- 지금에 더할 분. (음수는 과거, 0 이면 지금)Minutes to add to now. (negative is the past, 0 is now)
반환Returns{ year: number, month: number, day: number, hour: number, minute: number, second: number, weekday: number } 현지 시각. (해, 달 1 에서 12, 날, 시, 분, 초, 요일 0 이 일요일)Local time. (year, month 1 to 12, day, hour, minute, second, weekday with 0 as Sunday)
import { Engine, EngineConfiguration, Scene, Vector2 } from "./build/vanilla.js";
class MainScene extends Scene {
async load(engine) {
await super.load(engine);
const now = engine.readLocalTime();
const later = engine.readLocalTime(120);
const earlier = engine.readLocalTime(-120);
console.log(now.hour < 24 && now.month >= 1 && now.month <= 12, later.hour !== earlier.hour);
}
}
const engineConfiguration = new EngineConfiguration();
engineConfiguration.referenceResolutionSize = Vector2.create(640, 360);
const engine = new Engine(engineConfiguration);
engine.run(new MainScene());현재 프레임 번호 반환.
Returns the current frame number.
반환Returnsnumber 지금 프레임 번호. (run 을 부르면 1 이 되고 프레임을 마칠 때마다 1 씩 는다)The current frame number. (becomes 1 when run is called and increases by 1 each time a frame finishes)
짝Counterpart: vanilla-engine Engine.get_frame_number
종료를 요청했는지. (exitApplication 을 불렀으면 참, 브라우저가 창 닫기를 거부해도 참)
Whether exit has been requested. (True if exitApplication was called, true even if the browser refuses to close the window)
반환Returnsboolean exitApplication 을 불렀으면 참.True if exitApplication was called.
짝Counterpart: vanilla-engine Engine.is_exit_requested
창 제목 설정. (탭 제목, document.title)
Sets the window title. (Tab title, document.title)
- titlestring
- 창 제목.Window title.
짝Counterpart: vanilla-engine Engine.set_title
알림 창. (window.alert 자리, 엔진이 그린 창, 러스트 판 Engine::alert 와 같다)
- 확인을 누르면 끝나는 손잡이를 돌려준다. (답은 늘 확인)
Alert dialog. (in place of window.alert, drawn by the engine, same as Engine::alert in the Rust edition)
- Returns a handle that finishes when OK is pressed. (the answer is always confirmed)
- messagestring
- 알릴 글.The message to show.
반환ReturnsModalDialogHandle 질문 창 손잡이.The dialog handle.
짝Counterpart: vanilla-engine Engine.alert
확인 창. (window.confirm 자리, 엔진이 그린 창, 러스트 판 Engine::confirm 과 같다)
Confirm dialog. (in place of window.confirm, drawn by the engine, same as Engine::confirm in the Rust edition)
- messagestring
- 물을 글.The question to ask.
반환ReturnsModalDialogHandle 질문 창 손잡이. (확인하면 isConfirmed 가 참)The dialog handle. (isConfirmed is true if confirmed)
짝Counterpart: vanilla-engine Engine.confirm
입력 창. (window.prompt 자리, 엔진이 그린 창, 러스트 판 Engine::prompt 와 같다)
Prompt dialog. (in place of window.prompt, drawn by the engine, same as Engine::prompt in the Rust edition)
- messagestring
- 물을 글.The question to ask.
- defaultValuestring
- 입력 칸의 기본값.The default value of the input field.
반환ReturnsModalDialogHandle 질문 창 손잡이. (확인하면 getPromptText 가 입력한 글)The dialog handle. (getPromptText is the entered text if confirmed)
짝Counterpart: vanilla-engine Engine.prompt
알림 창을 띄우고 닫히면 풀리는 Promise. (러스트 판 Engine::alert_async)
Shows an alert dialog and returns a Promise that resolves when it closes. (the Rust Engine::alert_async)
- messagestring
- 알릴 글.The message to show.
반환ReturnsPromise<void> 닫히면 풀린다.Resolves when closed.
짝Counterpart: vanilla-engine Engine.alert_async
확인 창을 띄우고 답하면 풀리는 Promise. (러스트 판 Engine::confirm_async)
Shows a confirm dialog and returns a Promise that resolves when answered. (the Rust Engine::confirm_async)
- messagestring
- 물을 글.The question to ask.
반환ReturnsPromise<boolean> 확인하면 참.true if confirmed.
짝Counterpart: vanilla-engine Engine.confirm_async
입력 창을 띄우고 답하면 풀리는 Promise. (러스트 판 Engine::prompt_async)
Shows a prompt dialog and returns a Promise that resolves when answered. (the Rust Engine::prompt_async)
- messagestring
- 물을 글.The question to ask.
- defaultValuestring
- 입력 칸의 기본값.The default value of the input field.
반환ReturnsPromise<string | null> 입력한 글. (취소하면 null)The entered text. (null if cancelled)
짝Counterpart: vanilla-engine Engine.prompt_async
질문 창이 떠 있는지. (떠 있는 동안 엔진은 씬을 갱신하지 않는다, 러스트 판 Engine::is_modal_dialog_open 과 같다)
Whether a modal dialog is open. (while it is open the engine does not update scenes, same as Engine::is_modal_dialog_open in the Rust edition)
반환Returnsboolean 떠 있으면 참.True if shown.
짝Counterpart: vanilla-engine Engine.is_modal_dialog_open
시스템 클립보드에 글 쓰기. (navigator.clipboard.writeText, 기다리지 않는다. 막히거나 없으면 아무것도 하지 않는다)
Writes text to the system clipboard. (navigator.clipboard.writeText, does not wait. Does nothing if blocked or unavailable)
- textstring
- 클립보드에 쓸 글.Text to write to the clipboard.
짝Counterpart: vanilla-engine Engine.write_clipboard_text
시스템 클립보드 글 읽기. (navigator.clipboard.readText, 브라우저는 비동기라 Promise. 글이 없거나 막히면 null)
- 브라우저가 권한을 묻거나 사용자 입력 안에서만 허락할 수 있다.
Reads text from the system clipboard. (navigator.clipboard.readText, a Promise since the browser is asynchronous. null if there is no text or it is blocked)
- The browser may ask for permission or allow it only inside user input.
반환ReturnsPromise<string | null> 클립보드의 글. (없거나 막히면 null)The clipboard text. (null if none or blocked)
짝Counterpart: vanilla-engine Engine.read_clipboard_text
import { Engine, EngineConfiguration } from "./build/vanilla.js";
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
engine.writeClipboardText("score: 100");
const readPromise = engine.readClipboardText();
readPromise.then((text) => {
if (text === null) {
console.log("clipboard blocked");
}
else {
console.log(text);
}
});주된 손이 손가락인지. (CSS 의 pointer: coarse)
Whether the primary pointer is a finger. (CSS pointer: coarse)
반환Returnsboolean 주된 손이 손가락이면 참.True if the primary pointer is a finger.
짝Counterpart: vanilla-engine Engine.is_coarse_pointer
씬 불러오기. (SceneManager.loadScene 과 같다)
Loads a scene. (Same as SceneManager.loadScene)
- sceneScene
- 불러올 씬.Scene to load.
반환ReturnsPromise<void> load, initialize 까지 마치면 끝나는 Promise. (이미 불러온 씬이면 바로 끝난다)A Promise that settles after load and initialize finish. (settles at once if the scene is already loaded)
짝Counterpart: vanilla-engine Engine.load_scene
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
class GameScene extends Scene {
}
class PauseScene extends Scene {
initialize(engine) {
console.log("pause scene ready");
}
}
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
engine.run(new GameScene());
const pauseScene = new PauseScene();
await engine.loadScene(pauseScene);
const isPauseSceneLoaded = pauseScene.isLoaded();
console.log(isPauseSceneLoaded);
await engine.unloadScene(pauseScene);
const loadedScenes = engine.getAllLoadedScenes();
console.log(loadedScenes.length);씬 하나 내리기. (SceneManager.unloadScene 과 같다)
Unloads one scene. (Same as SceneManager.unloadScene)
- sceneScene
- 내릴 씬.Scene to unload.
반환ReturnsPromise<void> finalize, unload 를 마치고 목록에서 빼면 끝나는 Promise. (불러오지 않은 씬이면 바로 끝난다)A Promise that settles after finalize and unload finish and the scene is removed from the list. (settles at once if the scene is not loaded)
짝Counterpart: vanilla-engine Engine.unload_scene
모든 씬 내리기. (SceneManager.unloadAllScenes 와 같다)
Unloads all scenes. (Same as SceneManager.unloadAllScenes)
반환ReturnsPromise<void> 불러온 씬을 차례로 모두 내리면 끝나는 Promise.A Promise that settles after all loaded scenes are unloaded in order.
짝Counterpart: vanilla-engine Engine.unload_all_scenes
불러온 씬 목록 반환. (불러온 차례, 러스트 판 get_all_loaded_scenes 와 같다)
Returns the list of loaded scenes. (in load order, same as get_all_loaded_scenes in the Rust version)
반환ReturnsScene[] 불러온 씬 목록. (엔진이 들고 있는 배열이라 고치지 않는다)List of loaded scenes. (the array the engine holds, do not modify it)
짝Counterpart: vanilla-engine Engine.get_all_loaded_scenes
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
console.log(engine.getAllLoadedScenes().length);페이지가 가려져 있는지. (다른 탭, 앱 전환)
Whether the page is hidden. (Another tab, app switching)
반환Returnsboolean 페이지가 가려져 있으면 참.True if the page is hidden.
짝Counterpart: vanilla-engine Engine.is_page_hidden
페이지 이벤트 리스너 더하기. ((pageEvent) => void, PageEvent 의 값을 받는다)
Adds a page event listener. ((pageEvent) => void, receives a PageEvent value)
- pageEventListenerFunction
- (pageEvent) => void. 같은 함수는 한 번만 더한다.(pageEvent) => void. The same function is added only once.
짝Counterpart: vanilla-engine Engine.add_page_event_listener
import { Engine, EngineConfiguration, Scene, PageEvent } from "./build/vanilla.js";
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
engine.run(new Scene());
const timeManager = engine.getTimeManager();
const pageEventListener = (pageEvent) => {
if (pageEvent === PageEvent.hidden) {
timeManager.setTimeScale(0);
}
else if (pageEvent === PageEvent.visible) {
timeManager.setTimeScale(1);
}
};
engine.addPageEventListener(pageEventListener);
const isPageHidden = engine.isPageHidden();
console.log(isPageHidden);페이지 이벤트 리스너 빼기.
Removes a page event listener.
- pageEventListenerFunction
- 더했던 리스너. (없으면 아무것도 하지 않는다)A listener added before. (does nothing if not found)
짝Counterpart: vanilla-engine Engine.remove_page_event_listener
그래픽 컨텍스트 이벤트 리스너 더하기. ((graphicContextEvent) => void, GraphicContextEvent 의 값을 받는다)
Adds a graphic context event listener. ((graphicContextEvent) => void, receives a GraphicContextEvent value)
- graphicContextEventListenerFunction
- (graphicContextEvent) => void. 같은 함수는 한 번만 더한다.(graphicContextEvent) => void. The same function is added only once.
짝Counterpart: vanilla-engine Engine.add_graphic_context_event_listener
import { Engine, EngineConfiguration, Scene, GraphicContextEvent } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
let isRebuildNeeded = false;
engine.addGraphicContextEventListener((graphicContextEvent) => {
if (graphicContextEvent === GraphicContextEvent.restored) {
isRebuildNeeded = true;
}
});
console.log(isRebuildNeeded);그래픽 컨텍스트 이벤트 리스너 빼기.
Removes a graphic context event listener.
- graphicContextEventListenerFunction
- 더했던 리스너. (없으면 아무것도 하지 않는다)A listener added before. (does nothing if not found)
짝Counterpart: vanilla-engine Engine.remove_graphic_context_event_listener
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
const graphicContextEventListener = (graphicContextEvent) => {
console.log(graphicContextEvent);
};
engine.addGraphicContextEventListener(graphicContextEventListener);
engine.removeGraphicContextEventListener(graphicContextEventListener);그래픽 오류 리스너 더하기. (({ kind, name, error }) => void, kind 는 GraphicErrorKind 의 값)
Adds a graphic error listener. (({ kind, name, error }) => void, kind is a GraphicErrorKind value)
- graphicErrorListenerFunction
- ({ kind, name, error }) => void. 같은 함수는 한 번만 더한다.({ kind, name, error }) => void. The same function is added only once.
짝Counterpart: vanilla-engine Engine.add_graphic_error_listener
import { Engine, EngineConfiguration, Scene, GraphicErrorKind } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
const failedNameList = [];
engine.addGraphicErrorListener((graphicError) => {
if (graphicError.kind === GraphicErrorKind.shaderBuildFailed) {
failedNameList.push(graphicError.name);
}
});
console.log(failedNameList.length);그래픽 오류 리스너 빼기.
Removes a graphic error listener.
- graphicErrorListenerFunction
- 더했던 리스너. (없으면 아무것도 하지 않는다)A listener added before. (does nothing if not found)
짝Counterpart: vanilla-engine Engine.remove_graphic_error_listener
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
const graphicErrorListener = (graphicError) => {
console.log(graphicError.kind);
};
engine.addGraphicErrorListener(graphicErrorListener);
engine.removeGraphicErrorListener(graphicErrorListener);그래픽 오류 알리기. (리스너에 그 자리에서 넘긴다, 리스너의 예외는 알리고 다음으로 간다)
Notifies a graphic error. (Passes it to the listeners on the spot, a listener's exception is reported and it moves on to the next)
- graphicErrorobject
- { kind: GraphicErrorKind 의 값, name: 짓지 못한 것의 이름, error: 던져진 오류 }{ kind: a GraphicErrorKind value, name: the name of what could not be built, error: the thrown error }
짝Counterpart: vanilla-engine Engine.dispatch_graphic_error
그래픽 컨텍스트 이벤트 알리기. (리스너에 그 자리에서 넘긴다, 리스너의 예외는 알리고 다음으로 간다)
Notifies a graphic context event. (Passes it to the listeners on the spot, a listener's exception is reported and it moves on to the next)
- graphicContextEventstring
- GraphicContextEvent 의 값.A GraphicContextEvent value.
짝Counterpart: vanilla-engine Engine.dispatch_graphic_context_event
GPU 메모리 셈 켜기. (개발용, Graphic.enableGpuMemoryTracking 과 같다)
Turns on GPU memory tracking. (For development, same as Graphic.enableGpuMemoryTracking)
짝Counterpart: vanilla-engine Engine.enable_gpu_memory_tracking
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
engine.enableGpuMemoryTracking();
console.log(engine.isGpuMemoryTrackingEnabled());GPU 메모리 셈이 켜져 있는지.
Whether GPU memory tracking is on.
반환Returnsboolean 켜져 있으면 true.true if on.
짝Counterpart: vanilla-engine Engine.is_gpu_memory_tracking_enabled
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engine = new Engine(new EngineConfiguration());
engine.run(new Scene());
console.log(engine.isGpuMemoryTrackingEnabled());GPU 메모리 읽기. (개발용, Graphic.readGpuMemoryUsage 와 같다)
Reads GPU memory. (For development, same as Graphic.readGpuMemoryUsage)
반환Returns{ totalBytes: number, canvasBytes: number, kindTable: object, ownerList: Array<{ owner: string, kind: string, count: number, bytes: number }> } 합(캔버스 몫 포함), 캔버스 몫, 종류별 { count, bytes }, 주인별 몫(큰 것부터).Total (including the canvas share), canvas share, per-kind { count, bytes }, per-owner shares (largest first).
짝Counterpart: vanilla-engine Engine.read_gpu_memory_usage
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engineConfiguration = new EngineConfiguration();
engineConfiguration.trackGpuMemory = true;
const engine = new Engine(engineConfiguration);
engine.run(new Scene());
const usage = engine.readGpuMemoryUsage();
console.log(usage.kindTable.texture.bytes, usage.kindTable.renderbuffer.bytes, usage.kindTable.buffer.bytes);페이지 이벤트 알리기. (가려짐을 적고 리스너에 그 자리에서 넘긴다, 리스너의 예외는 알리고 다음으로 간다)
Notifies a page event. (Records the hidden state and passes it to the listeners on the spot, a listener's exception is reported and it moves on to the next)
- pageEventstring
- PageEvent 의 값.A PageEvent value.
짝Counterpart: vanilla-engine Engine.dispatch_page_event
검증용 화면 저장 요청. (그 프레임을 다 그린 뒤 캔버스를 PNG data URL 로 넘긴다)
- 이미 지난 번호면 이번(프레임 사이에 부르면 다음) 프레임을 저장한다.
- 주소 쿼리로도 건다. (?capture=120,240 은 그 프레임들을 내려받기로 저장, captureName 은 파일 이름("{frame}" 은 번호), captureExit=1 은 마지막 저장 뒤 exitApplication) 주소 쿼리로 건 찍기 모드는 결정적으로 찍게 시간이 프레임마다 1/60 초씩 간다. (실제 시각과 최대 FPS 제한을 쓰지 않는다, 러스트 판 VANILLA_CAPTURE_* 와 같다)
Requests a screen capture for verification. (After that frame is fully drawn, passes the canvas as a PNG data URL)
- If that frame number has already passed, captures this frame (the next frame if called between frames).
- Can also be set via the URL query. (?capture=120,240 saves those frames as downloads, captureName is the file name ("{frame}" is the number), captureExit=1 calls exitApplication after the last capture) Capture mode set via the URL query advances time by 1/60 s per frame for deterministic captures. (real time and the maximum FPS limit are not used, same as the Rust edition VANILLA_CAPTURE_*)
- frameNumbernumber
- 저장할 프레임 번호. (소수는 버리고, 이미 지났으면 지금 프레임)Frame number to capture. (the fraction is dropped; if already past, the current frame)
반환ReturnsPromise<string> PNG data URL.
짝Counterpart: vanilla-engine Engine.request_frame_capture
import { Engine, EngineConfiguration, Scene } from "./build/vanilla.js";
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
engine.run(new Scene());
const capturePromise = engine.requestFrameCapture(30);
capturePromise.then((dataUrl) => {
console.log(dataUrl.length);
});요청된 프레임이면 캔버스를 PNG 로 넘기기. (프레임 끝, 그린 것이 캔버스에 남아 있을 때 부른다)
Passes the canvas as PNG if it is a requested frame. (Called at frame end, while the drawing remains on the canvas)
주소 쿼리의 화면 저장 요청 걸기. (capture, captureName, captureExit)
Sets up screen capture requests from the URL query. (capture, captureName, captureExit)
PageEventenum
페이지 이벤트. (엔진이 리스너에 넘긴다, addPageEventListener)
Page event. (Passed to listeners by the engine, addPageEventListener)
| 이름Name | 값Value | 설명Description |
|---|---|---|
visible | visible | 페이지가 다시 보임.The page became visible again. |
blurred | blurred | 창이 포커스를 잃음. (blur)The window lost focus. (blur) |
focused | focused | 창이 포커스를 얻음. (focus)The window gained focus. (focus) |
pointerDown | pointerDown | 창을 누름. (pointerdown, 포커스를 알리지 않아도 누르면 창은 포커스를 가진 것이다)The window was pressed. (pointerdown, once pressed the window has focus even without a focus notification) |
GraphicContextEventenum
그래픽 컨텍스트 이벤트. (엔진이 리스너에 넘긴다, addGraphicContextEventListener)
Graphic context event. (Passed to listeners by the engine, addGraphicContextEventListener)
| 이름Name | 값Value | 설명Description |
|---|---|---|
lost | lost | WebGL 컨텍스트를 잃음. (GPU 메모리 부족, 드라이버 재설정, 백그라운드 회수. 잃은 동안 엔진은 그리지 않고 씬 갱신만 한다)The WebGL context was lost. (Out of GPU memory, driver reset, or reclaimed in the background. While lost, the engine does not draw and only updates scenes) |
restored | restored | 컨텍스트가 되살아나 엔진이 기본 자원을 다시 지음. (게임이 지은 GL 객체와 3D 렌더러, 렌더 타겟은 죽었으니 이때 다시 짓는다)The context was restored and the engine rebuilt its base resources. (GL objects the game made and 3D renderers and render targets are dead, rebuild them now) |
GraphicErrorKindenum
그래픽 오류 갈래. (엔진이 그래픽 오류 리스너에 넘기는 { kind, name, error } 의 kind, addGraphicErrorListener)
Graphic error kinds. (The kind of the { kind, name, error } the engine passes to graphic error listeners, addGraphicErrorListener)
| 이름Name | 값Value | 설명Description |
|---|---|---|
shaderBuildFailed | shaderBuildFailed | 셰이더 프로그램을 짓지 못함. (컴파일이나 링크 실패, 같은 프로그램은 다시 알리지 않고 짓지도 않는다. 컨텍스트를 잃은 탓의 실패는 알리지 않는다)A shader program could not be built. (A compile or link failure, the same program is neither reported again nor rebuilt. A failure caused by losing the context is not reported) |